using System;
using System72.NTextile;

public partial class RefGuide : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        TextileParser parser = new TextileParser(lblGuideInput.Text);
        // Add supported Alignments
        parser.AllowLeftAlignment = true;
        parser.AllowRightAlignment = true;
        parser.AllowCenterAlignment = true;
        parser.AllowJustifyAlignment = true;
        //Add supported Attribute operations
        parser.AllowClassAttribute = true;
        parser.AllowClassIdAttribute = true;
        parser.AllowIdAttribute = true;
        parser.AllowStyleAttribute = true;
        parser.AllowLanguageAttribute = true;
        //Add supported Phrase Modifiers
        parser.AllowCitationModifier = true;
        parser.AllowBoldModifier = true;
        parser.AllowDeletedTextModifier = true;
        parser.AllowEmphasisModifier = true;
        parser.AllowInsertedTextModifier = true;
        parser.AllowSpanModifier = true;
        parser.AllowStrongModifier = true;
        parser.AllowSubscriptModifier = true;
        parser.AllowSuperscriptModifier = true;
        parser.AllowItalicsModifier = true;
        //Add supported Block Modifiers
        parser.AllowHeaderModifier = true;
        parser.AllowBlockquoteModifier = true;
        parser.AllowParagraphModifier = true;
        parser.AllowBlockcodeModifier = true;
        parser.AllowPreformatModifier = true;
        parser.AllowNoTextileModifier = true;
        //Add supported Punctuation Modifiers last to process after everything else has been parsed
        parser.AllowCopyrightPunctuation = true;
        parser.AllowTrademarkPunctuation = true;
        parser.AllowRegisteredPunctuation = true;
        parser.AllowEmDashPunctuation = true;
        parser.AllowEnDashPunctuation = true;
        parser.AllowDimensionPunctuation = true;
        parser.AllowDoubleQuotesPunctuation = true;
        parser.AllowSingleQuotesPunctuation = true;
        parser.AllowEllipsesPunctuation = true;

        //Add other supported Modifiers
        parser.AllowNumericListModifier = true;
        parser.AllowBulletedListModifier = true;
        parser.AllowLinkModifier = true;
        parser.AllowFootnoteModifier = true;
        parser.AllowFootnoteRefModifier = true;
        parser.AllowImageModifier = true;
        parser.AllowAcronymModifier = true;
        parser.AllowImageLinkModifier = true;

        //Get the formatted XHTML: Parse!!!!
        lblPreview.Text = parser.GenerateXHTML();
    }
}
